---
title: "Accessibility Checker Rule Help: WCAG20_Style_BeforeAfter"
---
import "../../../styles/ToolHelp.scss"
import { CodeSnippet, Tag } from "carbon-components-react";

<div className="toolHelp">
<Row>
<Column colLg={16} colMd={8} colSm={4} className="toolHead">

### Verify the `::before` and `::after` pseudo-elements do not insert non-decorative content

<div id="locLevel"></div>

Do not use CSS `::before` and `::after` pseudo-elements to insert non-decorative content

</Column>
</Row>
<Row>
<Column colLg={11} colMd={5} colSm={4} className="toolMain">

### Why is this important?

The CSS `::before` and `::after` pseudo-elements specify the location of content to be inserted before and after an element's document tree content. For users who need to customize or turn off style information so that they can view content according to their needs, assistive technologies might not be able to access the information that is inserted using CSS.

<div id="locSnippet"></div>

### What to do

 * Verify that any content inserted by the CSS `::before` and `::after` pseudo-elements is purely decorative;
 * OR, disable CSS styles and verify that non-decorative information in the inserted content is still available;
 * OR, include the important information directly in the page.

</Column>
<Column colLg={5} colMd={3} colSm={4} className="toolLeft">

### About this requirement

[IBM 1.3.1 Info and Relationships](https://www.ibm.com/able/requirements/requirements/#1_3_1)
[WCAG 2.1 failure technique F87](https://www.w3.org/WAI/WCAG21/Techniques/failures/F87.html)

### Who does this affect?

 * People with visual impairment using color contrast enhancement
 * People who use alternate backgrounds to increase legibility
 * People who personalize their display colors for easier reading
 * People using text only, monochrome or braille displays
 * People using text-based browsers (e.g., Lynx) or audio interfaces

</Column>
</Row>
</div>

export default ({ children, _frontmatter }) => (<React.Fragment>{children}</React.Fragment>)
